//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "management\fn_loadTasks.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;
private ["_instances","_jip_instance","_jip_tasks","_x","_instance","_task_params"];

_instances = JIPGETVAR(QGVAR(MISSION_INSTANCES),[]);
TRACE_1("Instances",_instances);
{
	_instance = _x;
	_jip_instance = [_instance] call FFUNC(getMissionInstance);
	_jip_tasks = [_jip_instance, "__MISSION_TASKS__",[]] call CFUNC(HashGet);
	TRACE_1("Tasks",_jip_tasks);
	{
		_task_params = _x select 1;
		[_task_params,_instance,true] call FFUNC(updateTask);
	} foreach _jip_tasks;
} foreach _instances;

TRACE("End");
TMFPROFILERSTOP;
